﻿using FluentValidation;
using FluentValidation.Attributes;
using Quickie.Models;
using Quickie.Models.IoC;
using Quickie.Models.Data;
using Quickie.Models.Entities;
using Quickie.Models.ViewModel;
using Quickie.Models.Interfaces;

namespace Quickie.Models.Entities
{
    [Validator(typeof(CompanyValidation))]
    public partial class Company : IEntity
    {

    }

    public class CompanyValidation : AbstractValidator<Company>
    {
        public CompanyValidation()
        {
            RuleFor(x => x.Name)
                .NotEmpty()
                .WithMessage("Unesite naziv tvrtke");
        }

    }
}